package Thread;

import com.company.Thread.ThreadTest;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName DataStructure
 * @Description: TODO
 * @date ${DAT}23:41
 */
public class Thread1 {
    static class ThreadTest extends Thread{
        @Override
        public void run() {
        }
    }
    public static void test(){
        for (int i = 0; i < 100;i++){
            try {
                Thread.sleep(1000*2);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(i);
        }
    }
    public static void main(String[] args) {
        Thread thread1 = new Thread(new ThreadClock());
        Thread thread2 = new Thread(new ThreadTest());
        try {
            thread1.start();
        }catch (Exception e){
            System.out.println("时间到");
            return;
        }
        Thread1.test();

    }
}
